<template>
	<view class="container">
		
		<!-- 顶部导航 -->
		<uni-nav-bar dark :fixed="true" shadow background-color="#536CFC" status-bar title="工作台" />
		
		<!-- 基础用法 -->
		<uni-section title="基础用法" type="line" padding class="_uni-section">
			
			<view class="content">
				<view class="content-item" style="background-color: #36BFE9;">待办发文 <view class="content-item-num">1</view> </view>
				<view class="content-item" style="background-color: #EE609E;">待办收文 <view class="content-item-num">1</view>  </view>
				<view class="content-item" style="background-color: #A04AF4;">请假申请 <view class="content-item-num">1</view>  </view>
			</view>
			<view class="content" style="margin-top: 10px;">
				<view class="content-item" style="background-color: #FC9C55;">待办发文 <view class="content-item-num">1</view></view>
				<view class="content-item" style="background-color: #26C4B7;">待办收文 <view class="content-item-num">1</view></view>
				<view class="content-item" style="background-color: #ABC571;">请假申请 <view class="content-item-num">1</view></view>
			</view>

		</uni-section>
				
		<!-- 通知 -->
		<uni-section title="通知" type="line" style="margin-top: 10px;">
			<template v-slot:right>
				<view style="color: #2979ff;">
					全部 <text class="iconfont icon-right-1-copy"></text>
				</view>
			</template>
			<uni-list v-for="item in 10">
				<uni-list-item title="[通知]OA手机端更新" note="2024-11-01" />
				<uni-list-item title='通知]关于做好厅系统"春节"假期办公区域安全和公务用车管理函' note="2024-11-01" />
			</uni-list>
		</uni-section>
		
		
	</view>
</template>

<script>
	import { getToken } from "@/utils/auth";
	import store from '@/store' 
	import { loadHome } from "@/api/home/index.js"
	import storage from '@/utils/storage'
	
	export default {
	  name: 'HomePage',
	  onShow() {
	    // 页面每次显示时执行
		if (getToken()) {
			// 登录成功后，查询首页信息
			const config = {
				apkId: store.getters.apkId,
				appId: store.getters.appId
			}
			loadHome(config).then( res => {
				console.log("查询首页信息", res)
			})
		}
	  },
	  methods: {
	    
	  }
	}
	

</script>

<style scoped>
	.container {
		width: 100%;
		height: 100%;
	}
	.content {
		width: 100%;
		height: 100rpx;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	.content-item {
		width: 30%;
		background-color: cyan;
		border-radius: 10rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}
	.content-item-num {
		width: 40rpx;
		height: 40rpx;
		line-height: 40rpx;
		text-align: center;
		background-color: white;
		border-radius: 100rpx;
		margin-left: 20rpx;
	}
</style>
